<?php
	require("check_active.php");
?>
					<form id="password" method="post" class="window">
						<div class="cabeza">
							password
						</div>
						<div class="cuerpo">
							<div class="titulo">
								ingresa tu contraseña
							</div>
							<input id="ncontrol" name="ncontrol" value="<? print $nocontrol;?>" type="hidden" />
							<input id="pass" name="pass" value="" type="password" tabindex="0" length="5"/>
						</div>
						<div class="btones">
							<input id="cancelar" type="button" value="cancelar" />
							<input type="submit" value="Ingresar" />
						</div>
					</form>
					<script type="text/javascript">
						//import_script("javascript/md5.js");
						$('password').addEvent('submit', function(e){
								new Event(e).stop();
								//var password = hex_md5(this.pass.value);
								var password = this.pass.value;
								if(password.length==0)
									alert("Debe ingresar su contraseña. Gracias");
								else
									site.login(this.ncontrol.value, password.substring(0,10));
							}
						);
						$('cancelar').addEvent('click', function(){
								if(confirm('¿Estas seguro?'))
									site.showLogin();
							}
						);
						$('pass').focus();
					</script>
